/*
 * @Description: 
 * @Date: 2025-07-31 09:50:30
 * @LastEditTime: 2025-08-13 11:08:21
 */
import request from "../utils/request";

export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data,
  });
}

export function loginByPhone(data) {
  return request({
    url: "/corpuser/login",
    method: "post",
    data,
  });
}

export function getInfo(token) {
  return request({
    url: "/user/info",
    method: "get",
  });
}

export function generateSSOToken(data) {
    return request({
        url: "/sysuser/generateSSOToken",
        method: "post",
        data
    });
}

export function logout(token) {
  return request({
    url: "/user/userLogout",
    method: "post",
    data: {
      token,
    },
  });
}

export function modifyPassword(data) {
  return request({
    url: "/user/changePassword",
    method: "post",
    data,
  });
}

export function ssoLogin(data) {
  return request({
    url: "/user/sso/login",
    // url: "/user/sso/testLogin",
    method: "post",
    data,
  })
}

export function zqtSsoLogin(data) {
  return request({
    url: "/user/zqtSsoLogin",
    method: "post",
    data
  });
}
export function getUserInfo(data) {
  return request({
    url: "/sysuser/getuserinfo",
    method: "get",
    data
  });
}
export function updateUserInfo(data) {
  return request({
    url: "/sysuser/update",
    method: "post",
    data
  });
}
export function getHospitals(data) {
  return request({
    url: "/hospitals/queryByCond?pageSize=10&pageNum=1",
    method: "post",
    data:{}
  });
}
export function getExaminationPackages(data){
  return request({
    url: "/examinationpackages/queryByCond?pageSize=10&pageNum=1",
    method: "post",
    data
  });
}

export function addReservations(data){
  return request({
    url: "/userexaminations/add-reservations",
    method: "post",
    data
  });
}
export function reservationsByUserld(params){
  return request({
    url: "/userexaminations/reservationsByUserId",
    method: "get",
    params
  });
}
export function editPwd(data){
  return request({
    url: "/sysuser/editpwd",
    method: "post",
    data
  });
}
///sysuser/editpwd
///userexaminations/reservationsByUserld



